<?php
if (!$this->filePath) return '';
?>
<div class="mediaThumb">
	<a href="<?php echo htmlspecialchars(_ROOT_URL_STATIC.$this->filePath); ?>" target="_blank"><img src="<?php echo htmlspecialchars($this->GetFileThumb($this->filePath, $this->showImgThumb)); ?>"></a>
	<?php
	if (!isset($this->params['editable']) || $this->params['editable'])
	{
		echo $this->GetTpl('Icon')->GetIcon('delete', '#');
	}
	?>
	<input type="hidden" name="<?=$this->fieldName;?>[current]" value="<?php echo htmlspecialchars($this->filePath); ?>">
</div>
